//
//	HomeRecommandPosition.swift
//	Model file generated using JSONExport: https://github.com/Ahmed-Ali/JSONExport

import Foundation 
import ObjectMapper


class HomeRecommandPosition : NSObject, NSCoding, Mappable{

	var code : String?
	var dictKey : String?
	var dictValue : String?
	var id : Int?
	var isDeleted : Int?
	var isSealed : Int?
	var parentId : Int?
	var position : HomeRecommandPosition?
	var remark : String?
	var sort : Int?


	class func newInstance(map: Map) -> Mappable?{
		return HomeRecommandPosition()
	}
	required init?(map: Map){}
	private override init(){}

	func mapping(map: Map)
	{
		code <- map["code"]
		dictKey <- map["dictKey"]
		dictValue <- map["dictValue"]
		id <- map["id"]
		isDeleted <- map["isDeleted"]
		isSealed <- map["isSealed"]
		parentId <- map["parentId"]
		position <- map["position"]
		remark <- map["remark"]
		sort <- map["sort"]
		
	}

    /**
    * NSCoding required initializer.
    * Fills the data from the passed decoder
    */
    @objc required init(coder aDecoder: NSCoder)
	{
         code = aDecoder.decodeObject(forKey: "code") as? String
         dictKey = aDecoder.decodeObject(forKey: "dictKey") as? String
         dictValue = aDecoder.decodeObject(forKey: "dictValue") as? String
         id = aDecoder.decodeObject(forKey: "id") as? Int
         isDeleted = aDecoder.decodeObject(forKey: "isDeleted") as? Int
         isSealed = aDecoder.decodeObject(forKey: "isSealed") as? Int
         parentId = aDecoder.decodeObject(forKey: "parentId") as? Int
         position = aDecoder.decodeObject(forKey: "position") as? HomeRecommandPosition
         remark = aDecoder.decodeObject(forKey: "remark") as? String
         sort = aDecoder.decodeObject(forKey: "sort") as? Int

	}

    /**
    * NSCoding required method.
    * Encodes mode properties into the decoder
    */
    @objc func encode(with aCoder: NSCoder)
	{
		if code != nil{
			aCoder.encode(code, forKey: "code")
		}
		if dictKey != nil{
			aCoder.encode(dictKey, forKey: "dictKey")
		}
		if dictValue != nil{
			aCoder.encode(dictValue, forKey: "dictValue")
		}
		if id != nil{
			aCoder.encode(id, forKey: "id")
		}
		if isDeleted != nil{
			aCoder.encode(isDeleted, forKey: "isDeleted")
		}
		if isSealed != nil{
			aCoder.encode(isSealed, forKey: "isSealed")
		}
		if parentId != nil{
			aCoder.encode(parentId, forKey: "parentId")
		}
		if position != nil{
			aCoder.encode(position, forKey: "position")
		}
		if remark != nil{
			aCoder.encode(remark, forKey: "remark")
		}
		if sort != nil{
			aCoder.encode(sort, forKey: "sort")
		}

	}

}